﻿/*
 ***********************************
 时间：2017.9.14
 代码：WangSir
 脚本作用：客服按钮功能
 ************************************
 */
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Beyond.Ant;
using UnityEngine.UI;
using Beyond;

/// <summary> </summary>
public class ServiceButton : MonoBehaviour
{
    Button serviceButton;
    void Start()
    {
        //GetComponent<Image>().enabled = false;
        this.gameObject.SetActive(false);

        int kfkzValue = AppInfo.getSetting("kfkz", 0);
        if (kfkzValue == 1)
        {
            //GetComponent<Image>().enabled = true;
            this.gameObject.SetActive(true);
        }

        serviceButton = GetComponent<Button>();
        serviceButton.onClick.AddListener(OpenServer);
    }

    void Update()
    {

    }

    private void OpenServer()
    {
        BEAnt.openCustomerSeviceWindow();
    }
}